package gr.handmademarket.ui.modals;

import gr.handmademarket.ui.panels.LoginPanel;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;

/**
 * modal window for login. 
 */
public class LoginModal 
extends ModalWindow{

	/**
	 * serialVersionUID.
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * Creates a new LoginModal object. 
	 *
	 * @param id
	 */
	@SuppressWarnings("nls")
	public LoginModal(String id) {
		super(id);
		LoginPanel loginPanel = new LoginPanel(this.getContentId());
		setContent(loginPanel);
		this.setTitle("Sign in with your email");
		this.setInitialHeight(200);
		this.setInitialWidth(500);
		this.setResizable(false);
		this.setWindowClosedCallback(new WindowClosedCallback(){
			private static final long serialVersionUID = 1L;
			public void onClose(AjaxRequestTarget target){
				ModalUtils.closeCallback(LoginModal.this, target);
			}
		});
	}
	
}
